﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="frmpruebas.aspx.cs" Inherits="EstadisticaProduce.pruebas.frmpruebas" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src="../Scripts/jquery-1.7.min.js" type="text/javascript"></script>
    <script src="../Scripts/colResizable-1.2.min.js" type="text/javascript"></script>
    <script src="../Scripts/jquery.validate.js" type="text/javascript"></script>
    <script src="../Scripts/ScrollableGridPlugin.js" type="text/javascript"></script>

      <script type="text/javascript">
          $(function () {

              var onSampleResized = function (e) {
                  var columns = $(e.currentTarget).find("th");
                  var msg = "columns widths: ";
                  columns.each(function () { msg += $(this).width() + "px; "; })
                  //$("#sample2Txt").html(msg);

              };

              $("#GridView1").colResizable({
                  liveDrag: true,
                  gripInnerHtml: "<div class='grip'></div>",
                  draggingClass: "dragging",
                  onResize: onSampleResized
              });

              $("#Button1").click(function () {
                  alert("Hola desde jquery");
              });
              $("#form1").validate({
                  rules: {
                      TextBox1: {
                          required: true
                      },
                      ddlCities:
                        {
                            required: function (element) {
                                return $("#ddlCities").val() < 1;
                            }
                        }
                  },
                  messages: {
                      TextBox1: {
                          required: "Ingrese Campo"
                      }, ddlCities: { required: "Seleccione opcion" }

                  }
              });
              $('#<%=GridView1.ClientID %>').Scrollable({
                  ScrollHeight: 300
              });

          });	
  </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />

        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br />
        
        <asp:DropDownList ID="ddlCities" runat="server">
            <asp:ListItem Value="" Text="-Seleccione" />
            <asp:ListItem Value="0001" Text="codigo" />
        </asp:DropDownList><br />

        <asp:Button ID="Button1" runat="server" Text="Button" />

    <br />

        <asp:GridView ID="GridView1" runat="server">
        </asp:GridView>

    </div>
    </form>
</body>
</html>
